-
Notifications
You must be signed in to change notification settings - Fork 56
[newchem-cpp] generalize experimental ratequery API #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mabruzzo
wants to merge
56
commits into
grackle-project:newchem-cpp
Choose a base branch
from
mabruzzo:ncc/generalize_ratequery
base: newchem-cpp
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[newchem-cpp] generalize experimental ratequery API #477
mabruzzo
wants to merge
56
commits into
grackle-project:newchem-cpp
from
mabruzzo:ncc/generalize_ratequery
+3,259
−591
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For context, the gmock library is a component of googletest (it's already being installed). All this commit does is make it possible for us to use it in subsequent PRs
This change ensures that the chemistry_data extension type will provide a consistent set of attributes, even if we make unused rate information inaccessible through the ratequery interface
… the ratequery API
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To be reviewed after #476 has been merged
This PR updates the experimental
ratequeryapi so that it can:PointerUniontype was introduced to help make this work nicelyTo help implement this machinery, I also introduced the
SimpleVectype since the basic bookkeeping of growable lists was getting a little out of hand (frankly, I think it would probably be better to just usestd::vectorfor this purpose, but I have left that debate for the future).I also needed to modify the accessible properties to check both (i) the type of entry and (ii) whether the entry is mutable. Obviously, I also had to introduce a function to read strings.
Overall, I'm not thrilled with how complex the
ratequerylogic has gotten. I do have some ideas for simplifying things... (I actually added a bunch of notes to the docstring). But, I think requires developing other parts of the API. So, for the near -ish term, I think it's a useful crutch.Note
This PR doesn't actually introduce any entries to actually leverage this new functionality. That will be the subject of the next PR in this sequence
Footnotes
Lists of strings will commonly fall into this category. But as another example, consider the yields of metal nuclides for each injection pathways. Yes, right now we use these yields in make_consistent. But, in the near future, we expect that to change, and we will simply enforce that the abundances at the start and end of a timestep are consistent. When we make this change, we will want to make the assumed abundances available to users in case external simulation codes want to achieve better consistency with the injection models ↩